import { QRCodeSVG } from 'qrcode.react';
import React, { useState } from 'react';
import style from './index.less';
import { Modal, Button } from 'antd';
import ReactDOM from 'react-dom';
// import { IArticleItem } from '@/types';
import { Anchor } from 'antd';
import { Link } from 'umi';
import styles from '@/pages/knowledge/[id]/knowledgeKid.less'
const App = ({ floor }: any) => {
  const handleAnchorClick = (e: { preventDefault: () => void }, link: any) => {
    e.preventDefault();
  };
  const { Link } = Anchor;
  return (
    <Anchor
      onClick={handleAnchorClick}
      offsetTop={10}
      affix={false}
      style={{ height: 'auto' }}
    >
      {floor.map((item: any) => {
        return (
          <div key={item.id}>
            <div>
              <Link
                className={styles.FloorBright}
                href={`#${item.id}`}
                title={item.text}
              ></Link>
            </div>
          </div>
        );
      })}
    </Anchor>
  );
};

export default App;
